package com.example.gaodemap.dto;

import jakarta.validation.constraints.*;
import java.util.List;

public class StaticMapRequest {
    @NotBlank(message = "经纬度不能为空")
    private String location;

    @Min(value = 1, message = "缩放级别最小为1")
    @Max(value = 17, message = "缩放级别最大为17")
    private Integer zoom = 10;

    @Pattern(regexp = "^\\d+\\*\\d+$", message = "地图大小格式不正确，应为：宽度*高度")
    private String size = "400*400";

    @Min(value = 1, message = "scale值最小为1")
    @Max(value = 2, message = "scale值最大为2")
    private Integer scale = 1;

    @Min(value = 0, message = "traffic值最小为0")
    @Max(value = 1, message = "traffic值最大为1")
    private Integer traffic = 0;

    private List<Marker> markers;
    private List<Label> labels;
    private List<Path> paths;
    private String markersRaw;

    public static class Marker {
        private String style = "mid";
        private String color = "0xFF0000";
        private String label;
        private String location;
        public String getStyle() { return style; }
        public void setStyle(String style) { this.style = style; }
        public String getColor() { return color; }
        public void setColor(String color) { this.color = color; }
        public String getLabel() { return label; }
        public void setLabel(String label) { this.label = label; }
        public String getLocation() { return location; }
        public void setLocation(String location) { this.location = location; }
    }
    public static class Label {
        private String content;
        private Integer font = 0;
        private Integer bold = 0;
        private Integer fontSize = 10;
        private String fontColor = "0xFFFFFF";
        private String background = "0x5288d8";
        private String location;
        public String getContent() { return content; }
        public void setContent(String content) { this.content = content; }
        public Integer getFont() { return font; }
        public void setFont(Integer font) { this.font = font; }
        public Integer getBold() { return bold; }
        public void setBold(Integer bold) { this.bold = bold; }
        public Integer getFontSize() { return fontSize; }
        public void setFontSize(Integer fontSize) { this.fontSize = fontSize; }
        public String getFontColor() { return fontColor; }
        public void setFontColor(String fontColor) { this.fontColor = fontColor; }
        public String getBackground() { return background; }
        public void setBackground(String background) { this.background = background; }
        public String getLocation() { return location; }
        public void setLocation(String location) { this.location = location; }
    }
    public static class Path {
        private Integer weight = 5;
        private String color = "0x0000FF";
        private Double transparency = 1.0;
        private String fillColor;
        private Double fillTransparency = 0.5;
        private List<String> locations;
        public Integer getWeight() { return weight; }
        public void setWeight(Integer weight) { this.weight = weight; }
        public String getColor() { return color; }
        public void setColor(String color) { this.color = color; }
        public Double getTransparency() { return transparency; }
        public void setTransparency(Double transparency) { this.transparency = transparency; }
        public String getFillColor() { return fillColor; }
        public void setFillColor(String fillColor) { this.fillColor = fillColor; }
        public Double getFillTransparency() { return fillTransparency; }
        public void setFillTransparency(Double fillTransparency) { this.fillTransparency = fillTransparency; }
        public List<String> getLocations() { return locations; }
        public void setLocations(List<String> locations) { this.locations = locations; }
    }
    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }
    public Integer getZoom() { return zoom; }
    public void setZoom(Integer zoom) { this.zoom = zoom; }
    public String getSize() { return size; }
    public void setSize(String size) { this.size = size; }
    public Integer getScale() { return scale; }
    public void setScale(Integer scale) { this.scale = scale; }
    public Integer getTraffic() { return traffic; }
    public void setTraffic(Integer traffic) { this.traffic = traffic; }
    public List<Marker> getMarkers() { return markers; }
    public void setMarkers(List<Marker> markers) { this.markers = markers; }
    public List<Label> getLabels() { return labels; }
    public void setLabels(List<Label> labels) { this.labels = labels; }
    public List<Path> getPaths() { return paths; }
    public void setPaths(List<Path> paths) { this.paths = paths; }
    public String getMarkersRaw() { return markersRaw; }
    public void setMarkersRaw(String markersRaw) { this.markersRaw = markersRaw; }
} 